<div class="page page-form" data-ng-controller="addPay">
<div class="panel panel-default">
    <div class="panel-heading"><strong><span class="glyphicon glyphicon-th"></span>&nbsp;&nbsp;&nbsp;&nbsp;添加支出</strong></div>
    <div class="panel-body"  data-ng-controller="signupCtrl">
        <div class="form-group has-error has-feedback input-lg" style="height:30px;text-align: center;"><label data-ng-hide="isHide" class="control-label">{{errorShow}}</label></div>
        <form name="payFormInvalid" class="form-horizontal form-validation" data-ng-submit="addPay()">
            <div class="form-group">
                <div class="col-sm-1" style="text-align: right;">
                    <label>金额</label>
                </div>
                <div class="col-sm-4">
                    <input id="payMoney"  type="text"
                           class="form-control"
                           data-ng-model="payForm.money"
                           placeholder="数字或小数 单位为元"
                           data-ng-maxlength="10"
                           required>
                </div>
                <div class="col-sm-1"></div>
                <div class="col-sm-1" style="text-align: right;">
                    <label>摘要</label>
                </div>
                <div class="col-sm-4">
                    <input type="text"
                           class="form-control"
                           data-ng-model="payForm.remark"
                           >
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-1" style="text-align: right;">
                    <label>报销人</label>
                </div>
                <div class="col-sm-4">
                    <input type="text"
                           class="form-control"
                           data-ng-model="payForm.applyUser"
                           required>
                </div>
                <div class="col-sm-1"></div>
                <div class="col-sm-1" style="text-align: right;">
                    <label>备注</label>
                </div>
                <div class="col-sm-4">
                    <input type="text"
                           class="form-control"
                           data-ng-model="payForm.note"
                            >
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-1" style="text-align: right;">
                    <label>审批人</label>
                </div>
                <div class="col-sm-4">
                    <input type="text"
                           class="form-control"
                           data-ng-model="payForm.approveUser"
                           required>
                </div>
                <div class="col-sm-1"></div>
                <div class="col-sm-1" style="text-align: right;">
                    <label>票据</label>
                </div>
                <div class="col-sm-4">
                    <label class="switch switch-success"><input data-ng-disabled="payFormInvalid.$invalid" id="ynShow" data-ng-click="showFileUpload()" name="test" type="checkbox"><i></i></label>
                    <div class="space"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-1" style="text-align: right;">
                </div>
                <div class="col-sm-4">
                    <button type="submit" id="paySubmit" data-ng-click="invalidMoney()"  data-ng-disabled="payFormInvalid.$invalid"
                            class="btn btn-info btn-block btn-lg"
                            >保存</button>
                </div>
            </div>
            <br/>
        </form>
        <div data-ng-hide="fileHide">
            <input data-ng-click="setFileSubmit()" type="file" nv-file-select="" uploader="uploader" multiple  />
            <table class="table">
                <thead>
                <tr>
                    <th width="50%">文件名</th>
                    <th ng-show="uploader.isHTML5">大小</th>
                    <th ng-show="uploader.isHTML5">进度</th>
                    <th>状态</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="item in uploader.queue">
                    <td><strong>{{ item.file.name }}</strong></td>
                    <td ng-show="uploader.isHTML5" nowrap>{{ item.file.size/1024/1024|number:2 }} MB</td>
                    <td ng-show="uploader.isHTML5">
                        <div class="progress" style="margin-bottom: 0;">
                            <div class="progress-bar" role="progressbar" ng-style="{ 'width': item.progress + '%' }"></div>
                        </div>
                    </td>
                    <td class="text-center">
                        <span ng-show="item.isSuccess"><i class="glyphicon glyphicon-ok"></i></span>
                        <span ng-show="item.isCancel"><i class="glyphicon glyphicon-ban-circle"></i></span>
                        <span ng-show="item.isError"><i class="glyphicon glyphicon-remove"></i></span>
                    </td>
                    <td nowrap>
                        <button type="button" class="btn btn-success btn-xs" ng-click="item.upload()" ng-disabled="item.isReady || item.isUploading || item.isSuccess">
                            <span class="glyphicon glyphicon-upload"></span> 上传
                        </button>
                        <button type="button" class="btn btn-warning btn-xs" ng-click="item.cancel()" ng-disabled="!item.isUploading">
                            <span class="glyphicon glyphicon-ban-circle"></span> 取消
                        </button>
                        <button type="button" class="btn btn-danger btn-xs" ng-click="item.remove()">
                            <span class="glyphicon glyphicon-trash"></span> 移出
                        </button>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
</div>